Not Applicable.
1. Field of the Invention
This invention relates generally to the field of computer graphics and, more particularly, to high performance graphics systems for rendering graphical objects such as dots on a display screen.
2. Description of the Related Art
A graphics system (e.g. a hardware graphics accelerator) may be configured to receive graphics commands and to generate pixels for display on a display device. The commands may originate from a graphics application running on a host computer system. For example, the graphics application may issue commands to invoke the rendering dots or lines. The graphics system may render a dot in response to a command which specifies the center and radius of a disk which mathematically (i.e. geometrically) defines the dot. The command may also specify a color for the dot.
Experience has shown that the sharp transition of color at the edge of the dot leads to unpleasing visual effects. Thus, it is desirable to perform some sort of smoothing (i.e. anti-aliasing) of color around the edge of the dot disk. For example, it is possible to compute the radial distance R from the center of the dot for each pixel in a circular neighborhood of the dot (and concentric with the dot). Each pixels in a transition region around the dot may be assigned a smoothed color according to the relation
f(R)DotColor+(1xe2x88x92f(R))*PixelColor,
where the function f(R) transitions from one at the dot radius RD to zero at the some larger outer radius, and where PixelColor is the original intrinsic color of the pixel.
One problem with this approach is that it requires a computation of radial distance R for each pixel (or sample) in the neighborhood of the dot. Thus, there exists need for a system and method which could rending dots without the burdensome root sum of squares computation to determine radial distance for each pixel (or sample) in the neighborhood of a dot.
In various embodiments of the present invention, a graphics system may be configured to render anti-aliased dots in terms of samples and to generate pixels by filtering the samples. The pixels are supplied to one or more display devices. The means used to generate the samples may perform the computation of radial distance at positions on a grid in the rendering coordinate space. It may then interpolate estimates for the radial distances of samples around the dot as needed based on the radii at the grid positions.
In one set of embodiments, a method for generating a dot on a display device may be arranged as follows. A processing system (e.g. one or more processors configured to execute program instructions, one or more specialized circuits, or any combination of processors and specialized circuitry) may receive a graphics command specifying the center of the dot in a coordinate space, and determine a set of candidate bins which intersect a neighborhood of the dot center. The neighborhood may be large enough to contain the dot and an annular region around the dot. In addition, the processing system may:
(a) compute radial extent values at corners of the candidate bins, where the radial extent values indicate radial extent (e.g. distance or square distance) of the corners with respect to the dot center;
(b) interpolate estimated radial extent values (with respect to the dot center) for sample positions in the candidate render bins based on the corner radial extent values; and
(c) compute sample values for samples at the sample positions, where the sample values depend on the estimated radial extent values of the sample positions.
The sample values may be filtered to generate pixels which define a screen image. The pixels may be transmitted to a display device for visual output.
In a second set of embodiments, a graphics system may be configured to generate a dot on a display device as follows. The graphics system may comprise a rendering unit and a pixel computation unit. The rendering unit may be configured to:
(a) receive a graphics command specifying a center for the dot;
(b) compute radial extent values indicating radial extent from the dot center to a plurality of base positions in a neighborhood of the dot center;
(c) interpolate estimated radial extent values at sample positions in the neighborhood using the base radial extent values; and
(d) compute sample values for samples corresponding to the sample positions, where the sample values depend on the estimated radial extent values of the sample positions.
The sample values may be stored into a frame buffer. The pixel computation unit may be configured to read the sample values from the sample buffer and to filter the sample values to generate output pixels for transmission to the display device.